package com.ceuer.demo.thread;

public class Demo2DownLoad implements Runnable {
	private String url;
	private String name;
	
	public Demo2DownLoad(String url,String name) {
		this.url = url;
		this.name = name;
	}
	
	public static void main(String[] args) {
		new Thread(new Demo2DownLoad("https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png", "4.png")).start();
		new Thread(new Demo2DownLoad("https://www.baidu.com/img/flexible/logo/pc/peak-result.png", "5.png")).start();
		new Thread(new Demo2DownLoad("https://www.baidu.com/img/flexible/logo/pc/result.png", "6.png")).start();
	}
	
	@Override
	public void run() {
		WebDownLoader webDownLoader=new WebDownLoader();
		webDownLoader.downloader(url,name);
		System.out.println("下载了文件名为--->"+name);
	}
}

